# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.RouterStatusNatStatusNatRuleStatus do
  @moduledoc """
  Status of a NAT Rule contained in this NAT.

  ## Attributes

  *   `activeNatIps` (*type:* `list(String.t)`, *default:* `nil`) - A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"].
  *   `drainNatIps` (*type:* `list(String.t)`, *default:* `nil`) - A list of IPs for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
  *   `minExtraIpsNeeded` (*type:* `integer()`, *default:* `nil`) - The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT.
  *   `numVmEndpointsWithNatMappings` (*type:* `integer()`, *default:* `nil`) - Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
  *   `ruleNumber` (*type:* `integer()`, *default:* `nil`) - Rule number of the rule.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activeNatIps => list(String.t()) | nil,
          :drainNatIps => list(String.t()) | nil,
          :minExtraIpsNeeded => integer() | nil,
          :numVmEndpointsWithNatMappings => integer() | nil,
          :ruleNumber => integer() | nil
        }

  field(:activeNatIps, type: :list)
  field(:drainNatIps, type: :list)
  field(:minExtraIpsNeeded)
  field(:numVmEndpointsWithNatMappings)
  field(:ruleNumber)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.RouterStatusNatStatusNatRuleStatus do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.RouterStatusNatStatusNatRuleStatus.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.RouterStatusNatStatusNatRuleStatus do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
